package com.example.capsule_kafka.controller;

import com.example.capsule_kafka.service.GroupMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhuzhiming
 * @Date: 2022/5/3 23:07
 */
@RestController
public class MessageController {


    @Autowired
    GroupMessageService groupMessageService;

    @GetMapping("/getGroupMessages/{roomName}")
    public String getMessages(@PathVariable String roomName) {
        return groupMessageService.getMessages(roomName);
    }

}
